 * {
            box-sizing: border-box;
            margin: 0;
            font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }
        body {
            background: #f1f5f9;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            padding: 1.5rem;
        }
        .builder-container {
            max-width: 1800px;
            width: 100%;
            background: white;
            border-radius: 2rem;
            box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        .header {
            background: #ffffffdd;
            backdrop-filter: blur(8px);
            padding: 1.2rem 2rem;
            border-bottom: 1px solid #e9eef2;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
        }
        .logo h1 {
            font-size: 1.8rem;
            font-weight: 700;
            letter-spacing: -0.02em;
        }
        .logo small {
            font-size: 0.8rem;
            background: #eef5ff;
            color: #1e4a8b;
            padding: 0.2rem 0.8rem;
            border-radius: 40px;
            margin-left: 1rem;
            font-weight: 500;
        }
        .download-actions {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }
        .btn {
            background: white;
            border: 1px solid #cbd5e1;
            padding: 0.7rem 1.5rem;
            border-radius: 60px;
            font-weight: 600;
            font-size: 0.95rem;
            color: #1e293b;
            cursor: pointer;
            transition: 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 4px 6px -2px rgba(0,0,0,0.05);
        }
        .btn-primary {
            background: #1b4a8b;
            border-color: #0f2b4f;
            color: white;
            box-shadow: 0 8px 16px -4px #1b4a8b40;
        }
        .btn-primary:hover {
            background: #0f3a6b;
        }
        .btn:hover {
            background: #f1f5f9;
            transform: translateY(-2px);
        }
        .main-grid {
            display: grid;
            grid-template-columns: 260px 1fr 340px;
            gap: 1.2rem;
            padding: 1.8rem;
            background: #f9fbfd;
            flex: 1;
        }
        /* left sidebar */
        .field-library {
            background: white;
            border-radius: 1.5rem;
            padding: 1.5rem 1rem;
            box-shadow: 0 8px 20px -8px rgba(0,0,0,0.08);
            border: 1px solid #eef2f6;
            overflow-y: auto;
            max-height: 70vh;
        }
        .field-library h3 {
            font-size: 1rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #64748b;
            margin-bottom: 1.2rem;
            padding-left: 0.5rem;
        }
        .field-buttons {
            display: flex;
            flex-direction: column;
            gap: 0.7rem;
        }
        .field-btn {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 50px;
            padding: 0.8rem 1rem;
            font-weight: 500;
            text-align: left;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: 0.15s;
            cursor: pointer;
            color: #1e293b;
        }
        .field-btn:hover {
            background: #e6edf8;
            border-color: #a0bbda;
            transform: scale(1.02);
        }
        .template-section {
            margin-top: 2rem;
            border-top: 2px solid #eef2f6;
            padding-top: 1.2rem;
        }
        .template-section h4 {
            font-size: 0.9rem;
            color: #475569;
            margin-bottom: 0.8rem;
        }
        #templateSelect {
            width: 100%;
            padding: 0.7rem;
            border-radius: 40px;
            border: 1px solid #cbd5e1;
            background: white;
            font-size: 0.9rem;
            cursor: pointer;
        }
        /* preview panel */
        .preview-panel {
            background: white;
            border-radius: 1.5rem;
            padding: 1.8rem 1.5rem;
            box-shadow: 0 8px 20px -8px rgba(0,0,0,0.08);
            border: 1px solid #eef2f6;
            overflow-y: auto;
            max-height: 70vh;
        }
        .preview-panel h3 {
            font-size: 1rem;
            color: #64748b;
            margin-bottom: 1.5rem;
            display: flex;
            justify-content: space-between;
        }
   
        .field-item {
            background: #ffffff;
            border: 1px solid #edf2f7;
            border-radius: 20px;
            padding: 1.5rem 1.2rem 1.2rem 1.2rem;
            margin-bottom: 1rem;
            transition: 0.15s;
            position: relative;
            box-shadow: 0 2px 5px rgba(0,0,0,0.02);
        }
        .field-item.selected {
            border: 2px solid #1b4a8b;
            background: #f5faff;
        }
        .field-item label {
            font-weight: 600;
            display: block;
            margin-bottom: 0.5rem;
            color: #1e293b;
        }
        .field-item .help-text {
            font-size: 0.8rem;
            color: #64748b;
            margin-bottom: 0.5rem;
        }
        .field-item input, .field-item select, .field-item textarea {
            width: 100%;
            padding: 0.7rem 1rem;
            border: 1px solid #cbd5e1;
            border-radius: 14px;
            font-size: 0.95rem;
            background: white;
        }
        .field-item input[type="file"] {
            padding: 0.4rem;
        }
        .field-item .remove-field {
            position: absolute;
            top: 12px;
            right: 12px;
            background: #fee2e2;
            border: none;
            color: #b91c1c;
            width: 30px;
            height: 30px;
            border-radius: 30px;
            font-weight: bold;
            cursor: pointer;
        }
        .field-item .remove-field:hover {
            background: #fecaca;
        }
        .file-error {
            color: #b91c1c;
            font-size: 0.8rem;
            margin-top: 4px;
        }
        /* properties panel */
        .properties-panel {
            background: white;
            border-radius: 1.5rem;
            padding: 1.5rem 1.2rem;
            box-shadow: 0 8px 20px -8px rgba(0,0,0,0.08);
            border: 1px solid #eef2f6;
            overflow-y: auto;
            max-height: 70vh;
        }
        .properties-tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
            border-bottom: 2px solid #eef2f6;
            padding-bottom: 0.5rem;
        }
        .prop-tab {
            font-size: 0.9rem;
            padding: 0.4rem 1rem;
            border-radius: 40px;
            background: #f1f5f9;
            cursor: pointer;
            font-weight: 600;
            color: #475569;
        }
        .prop-tab.active {
            background: #1b4a8b;
            color: white;
        }
        .prop-content {
            display: none;
        }
        .prop-content.active {
            display: block;
        }
        .prop-group {
            margin-bottom: 1.2rem;
        }
        .prop-group label {
            font-size: 0.85rem;
            font-weight: 600;
            color: #334155;
            display: block;
            margin-bottom: 0.3rem;
        }
        .prop-group input, .prop-group textarea, .prop-group select {
            width: 100%;
            padding: 0.6rem 0.8rem;
            border: 1px solid #cbd5e1;
            border-radius: 14px;
            font-size: 0.9rem;
        }
        .prop-group.checkbox {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .prop-group.checkbox input {
            width: auto;
        }
        .prop-row {
            display: flex;
            gap: 0.5rem;
        }
        .empty-selection {
            color: #94a3b8;
            text-align: center;
            padding: 2rem 0;
            font-style: italic;
        }
        hr {
            border: none;
            border-top: 2px solid #eef2f6;
            margin: 1.2rem 0;
        }
        footer {
            padding: 0.8rem 2rem;
            border-top: 1px solid #e9eef2;
            color: #6b7a8f;
            font-size: 0.9rem;
            display: flex;
            justify-content: space-between;
            background: white;
        }
        .badge {
            background: #dcfce7;
            color: #166534;
            font-size: 0.75rem;
            padding: 0.2rem 0.6rem;
            border-radius: 40px;
        }